﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Autofac;
using Autofac.Builder;
using Autofac.Core;
using Autofac.Features.Scanning;
using Core.Events;
using Domain.Entities;
using Domain.Events;

namespace EventConsoleApplication1
{
    public class Second
    {
        public static void Run()
        {
             var orderService = new OrderService();
             orderService.OrderCreated += (s,e) => new EmailService().SendMail(e.OrderNo);
             orderService.OrderCreated += (s, e) => new SmsService().SendSms(e.OrderNo);
             orderService.CreateOrder();
        }
    }
}


